package com.tcd.policy.controller;

import com.tcd.policy.service.RecognizeeInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.tcd.Policy.pojo.RecognizeeInfo;
import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/RecognizeeInfo")
public class RecognizeeInfoController {

    @Autowired
    RecognizeeInfoService service;

    @RequestMapping("/selectRecognizeeInfoByinsurancestatus")
    public List<RecognizeeInfo> selectRecognizeeInfoByinsurancestatus(@RequestParam(defaultValue = "1") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize, String recognizeeName){
        List<RecognizeeInfo> list = service.selectRecognizeeInfoByinsurancestatus(pageIndex,pageSize,recognizeeName);
        return list;
    }

    @RequestMapping("/selectRecognizeeInfoByinsurancestatusCount")
    public Integer selectRecognizeeInfoByinsurancestatusCount(String recognizeeName){
        Integer count = service.selectRecognizeeInfoByinsurancestatusCount(recognizeeName);
        return count;
    }
}
